import os
from prettytable import prettytable

exps = ["checkerboard", "corners", "eight_gaussians", "four_circles", "diamond", "two_moons", "two_spirals", "crescent", "sign", "gaussian", "abs", "sinewave", ]
models = ["flow", "rej_flow", "ganvae", "vae"]

results = prettytable.PrettyTable(["exp", *models])
for exp in exps:
    result = [exp]
    for model in models:
        f_name = f"figures/{exp}_{model}_loglik.txt"
        if os.path.exists(f_name):
            with open(f_name) as f:
                result.append(f"{float(f.read()):.3f}")
        else:
            result.append(0)
    results.add_row(result)

print(results)
